# -*- coding:utf-8 -*-
import requests


from common.Dbutil import DBUtil
from common.get_headers_util import get_headers


def get_emploee_id():
    #链接数据库，先删一下电话号码对应的员工数据
    DBUtil.uid_db("delete from bs_user where mobile = '19999321321';")
    #添加员工接口获取
    emp_insert_resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/user",
                                    headers=get_headers(),
                                    json={"username":"李四","mobile":"19999321321","workNumber":"3450845309"})
    return emp_insert_resp.json().get("data").get("id")

if __name__ == '__main__':
    print(get_emploee_id())
